package com.tongann.wind.mapper;


import com.tongann.wind.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    List<User> getUserAll();

    User getUserByUsername(String username);

    @Insert("insert into ta_user(uuid,username,password,salt,loginTime,avatar,nickname,registerTime,loginCount,openId,orgId,isAdmin,isSuperAdmin) " +
            "values(#{uuid},#{username},#{password},#{salt},#{loginTime},#{avatar},#{nickname},#{registerTime},#{loginCount},#{openId},#{orgId},#{isAdmin},#{isSuperAdmin})")
    Boolean insertUser(User user);
}
